﻿using System;
using System.ComponentModel;

namespace $safeprojectname$.Examples
{
  [DisplayName("Example Console Lab")]
  [Description("A cross-platform lab with input and output.")]
  public sealed class ExampleConsoleLab : BaseConsoleLab
  {
    protected override void Main()
    {
      TraceLine("Call the TraceLine method to write messages to the console.");
      TraceLine();

      TraceSuccess("Call the semantic");
      TraceError("Trace* methods");
      TraceWarning("to write messages");
      TraceFailure("in various colors.");

      TraceLine();
      TraceLine("Call the WaitForKey method to consume the next key press.");
      TraceLine("Press a key...");

      ConsoleKeyInfo key = WaitForKey();

      TraceLine();
      TraceLine("You pressed: {0}", key.Key);

      TraceLine();
      TraceLine("Call the PressAnyKeyToContinue method to pause the lab.");

      PressAnyKeyToContinue();

      TraceLine();
      TraceLine("Call the UserInput method to acquire user input.");

      string input = UserInput("Enter text> ");

      TraceLine();
      TraceLine("You entered: {0}", input);
    }
  }
}